#include "GLFWAdapter.h"
#include "YLFW/Shader.h"

static void CallBack(GLFWwindow* window, int width, int height) {
	glViewport(0, 0, width, height);
}

static void ProcessInput(GLFWwindow* window) {
	if (glfwGetKey(window, GLFW_KEY_ESCAPE)) {
		glfwSetWindowShouldClose(window, true);
	}
}

static int TestMain() {
	GLInit();
	GLFWwindow* window = OpenWindow(800, 600, "Template", CallBack);
	while (!glfwWindowShouldClose(window)) {
		ProcessInput(window);

		glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
		glClear(GL_COLOR_BUFFER_BIT);

		glfwSwapBuffers(window);
		glfwPollEvents();
	}

	glfwTerminate();
	return 0;
}